/**
 * Created by fanfz on 2016/8/2 0002.
 */
window.onload = function () {
    var title = document.getElementById('title');
    var ol = document.getElementsByTagName('ol');
    var a = ol[0].getElementsByTagName('a');

    for (i=0;i<a.length;i++) {
        a[i].className = null;
        if (title.innerHTML == a[i].innerHTML) {
            a[i].className = 'selected';
        }
    }
};

//验证addContent
function checkAddContent() {
    var fm = document.content;
    if (fm.info.value == '' || fm.title.info.length < 2 || fm.title.info.length > 200) {
        alert('警告：公告不得为空并且不得小于两位并且不得大于200位！');
        fm.info.focus();
        return false;
    }
    return true;
}